package com.security.demo.entity;

public enum UserRoleEnum {
	
	/**
	 * 维修商用户
	 */
	USER(1),
	/**
	 * 客服用户
	 */
	ADMIN(2),
	;
	
	public Integer value;

	private UserRoleEnum(Integer value) {
		this.value = value;
	}
	
	public static UserRoleEnum getByValue(Integer value) {
		UserRoleEnum userRoleEnum = null;
		for (UserRoleEnum roleEnum : UserRoleEnum.values()) {
			if (roleEnum.value == value) {
				userRoleEnum = roleEnum;
				break;
			}
		}
		return userRoleEnum;
	}
}
